using System;
using System.IO;

namespace Camalon.Drawing
{
	/// <summary>
	/// Summary description for FileWriter.
	/// </summary>
	public class FileWatcher
	{
		private static string _fileName = @"C:\Dokumente und Einstellungen\ERDAL\Desktop\Trace.txt";
		
		public static void WriteLine( string s, bool append )
		{
			lock( _fileName )
			using(StreamWriter streamWriter =  new StreamWriter(_fileName, append))
			{
				try
				{
					streamWriter.WriteLine(s);
				}
				catch{}
			}
		}

		public static void WriteLine( string s )
		{
			lock( _fileName )
			using(StreamWriter streamWriter =  new StreamWriter(_fileName,true))
			{
				try
				{
					streamWriter.WriteLine(s);
				}
				catch{}
			}
		}
	}
}
